﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JzSport.Model
{
    public class Configs
    {
        public static string MessageAddress { get; set; }
        public static string MessagePort { get; set; }
        public static string MessageAccount { get; set; }
        public static string MessageToken { get; set; }
        public static string MessageAppId { get; set; }
        public static string MessageRegisterTemplateId { get; set; }
        public static string MessageForgottenTemplateId { get; set; }

        /// <summary>
        /// 站点基地址
        /// </summary>
        public static string BaseWebUrl { get; set; }

        /// <summary>
        /// 默认头像地址
        /// </summary>
        public static string DefaultAvatarUrl { get; set; }

        public static void Init()
        {
            MessageAddress = System.Configuration.ConfigurationManager.AppSettings["MessageAddress"];
            MessagePort = System.Configuration.ConfigurationManager.AppSettings["MessagePort"];
            MessageAccount = System.Configuration.ConfigurationManager.AppSettings["MessageAccount"];
            MessageToken = System.Configuration.ConfigurationManager.AppSettings["MessageToken"];
            MessageAppId = System.Configuration.ConfigurationManager.AppSettings["MessageAppId"];
            MessageRegisterTemplateId = System.Configuration.ConfigurationManager.AppSettings["MessageRegisterTemplateId"];
            MessageForgottenTemplateId = System.Configuration.ConfigurationManager.AppSettings["MessageForgottenTemplateId"];
            BaseWebUrl = System.Configuration.ConfigurationManager.AppSettings["BaseWebUrl"];
            DefaultAvatarUrl = System.Configuration.ConfigurationManager.AppSettings["DefaultAvatarUrl"];
        }
    }
}
